﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DGSFramework.Models
{
    public class StockBaseModel
    {
        public string StockCode { get; set; }

        public int StockId { get; set; }
        public int StockDataID { get; set; }
        public DateTime? GetTime { get; set; }
        public float? KL_Gia { get; set; }
        public virtual string GetTimeStr
        {
            get {
                return GetTime.Value.ToString("dd/MM/yyyy");                
            }             
        }
        public long GetTimetamp
        {
            get
            {
                System.TimeSpan span = new System.TimeSpan(System.DateTime.Parse("1/1/1970").Ticks);
                System.DateTime time = GetTime.Value.Subtract(span);
                return (long)(time.Ticks / 10000);
            }
        }

        public float? GiaThamChieu { get; set; }

        public string Name { get; set; }
        public string Name_en { get;set;}
        public string Sector { get; set; }
        public string Sector_en { get; set; }
        //time dung de lay du lieu khi click vao danh sach stock
        public string GetTimeCondition
        {
            get
            {
                return GetTime.Value.ToString("yyyy/MM/dd");
            }
        }
    }
}
